﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace Manager.FormMain
{
    public partial class Frm_Ribbon_TienSanh : DevExpress.XtraEditors.XtraForm
    {
        public Frm_Ribbon_TienSanh()
        {
            InitializeComponent();
        }

        private void tabControl_CloseButtonClick(object sender, EventArgs e)
        {
            try
            {
                DevExpress.XtraTab.XtraTabControl xtab = (DevExpress.XtraTab.XtraTabControl)sender;
                if (xtab.TabPages.Count == 1) return;
                int i = xtab.SelectedTabPageIndex;
                xtab.TabPages.RemoveAt(xtab.SelectedTabPageIndex);
                xtab.SelectedTabPageIndex = i - 1;
            }
            catch (Exception ex)
            {

            }
        }
    }
}